home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 12 / Mac Magazin and MacEasy Magazine CD - Issue 12.iso / Sharewarebibliothek / Anwendungen / Grafik / ASCII Art Maker93 / Documentation / HexDoubler next >
Encoding:
Text File  |  1995-07-06  |  5.5 KB  |  143 lines  |  [TEXT/ttxt]

  1. • HexDoubler
  2.  
  3. HexDoubler is an extension to the p2a core. It increases the size of the output image by a large amount. (You of course have a choice about whether to use it on or not) When you have a small 16x16 image it can really help, for instance. Heres an example of a standard 16x16 with and without HexD, respectively. (The image is of the standard QuickTime File.)
  4. [Note: This image was rendered without smooth edges.]
  5.  
  6. ASCII Image:
  7.  
  8.  |MWMW^~^~^~^~~||_              
  9.  ||~~|         ||~,             
  10.  ||__|         ||_|_,           
  11.  ||~~|         '~|~||           
  12.  ||__|___________|_||           
  13.  ||~~|^~^~^~^~^~~|~||           
  14.  ||__|           |_||           
  15.  ||~~|           |~||           
  16.  ||__|           |_||           
  17.  ||~~|           |~||           
  18.  ||__|___________|_||           
  19.  ||~~|^~^~^~^~^~~|~||           
  20.  ||__|           |_||           
  21.  ||~~|           |~||           
  22.  ||__|___________|_||           
  23.  
  24.  
  25. ASCII Image:
  26.  
  27.  |MW^~^~^~|_    
  28.  |_|      |_|_  
  29.  |_|_______|_|  
  30.  |_|       |_|  
  31.  |_|       |_|  
  32.  |_|_______|_|  
  33.  |_|       |_|  
  34.  |_|_______|_| 
  35.  
  36.  
  37. I don't feel it's perfect, but it's a nice feature. Of course, any time you can, use a bigger image at a higher resolution. They just turn out better. There are a few bugs:
  38. READ THIS BOLD STUFF!!! REALLY!
  39. It was not apparent in this picture, but HexD takes the last couple ASCII characters and smears them for 1/3 of the total image size. It doesn't do any damage, but you'll have to go in and trim off the extra stuff. Note slight distortion around the edges of some parts of the doubled image. However, HexD is a much better solution than actually going into a paint program and making the image twice as big (and not touching it up.) To demonstrate this, I blew up the above image (the small one) to 32x32, so that every pixel was twice as big. heres what I got, and what you'd get if you did this with *any* image in p2a.
  40.  
  41.  ASCII Image:
  42.  
  43.   MWMWMWMWMWMWMWMWMWMW          
  44.   MWMWMW            MWMW        
  45.   MW  MW            MW  MW      
  46.   MWMWMW            MWMWMWMW    
  47.   MW  MW              MW  MW    
  48.   MWMWMWMWMWMWMWMWMWMWMWMWMW    
  49.   MW  MW              MW  MW    
  50.   MWMWMW              MWMWMW    
  51.   MW  MW              MW  MW    
  52.   MWMWMW              MWMWMW    
  53.   MW  MW              MW  MW    
  54.   MWMWMWMWMWMWMWMWMWMWMWMWMW    
  55.   MW  MW              MW  MW    
  56.   MWMWMW              MWMWMW    
  57.   MW  MW              MW  MW    
  58.   MWMWMWMWMWMWMWMWMWMWMWMWMW
  59.  
  60. Obviously it's ugly, and not what the program was intended for.
  61. The smaller ASCII above, however, is acceptable. To show you when mr. HexD would be really helpfull, I've included a 16x16 icon converted with and without HexD. In my opinion, it does a good job making small text readable. See for yourself.
  62.  
  63. ASCII Image:
  64.  
  65.                 
  66.  |\  '(^ |,  |  
  67.  |\   |  | '.)  
  68.  '`  '^~ '   '  
  69.  . . .__ .   .  
  70.  |.) |,   \ `   
  71.  | | |__ .` \   
  72.                 
  73.  
  74. ASCII Image:
  75.  
  76.                                 
  77.  .__,  .____ .,    .,           
  78.  |(^\  '~)(^ |(.,  ||           
  79.  |(./    ||  |(^\  ||           
  80.  |(^\    ||  ||  '.)|           
  81.  |(./  ..)(. ||   ~)|           
  82.  '^~`  '^~^~ '`    '`           
  83.                                 
  84.  .,  . .____ .,    .,           
  85.  ||  | |(^^~ '\ , / `           
  86.  |(..) |(.,    '\ `             
  87.  |(^~) |(^`    ./ ,             
  88.  ||  | |(.__ ./ ` \ ,           
  89.  '`  ' '^~^~ '`    '`           
  90.                                 
  91.  
  92.  
  93. That's all you need to know to get started. 
  94.  
  95.  
  96. Tech notes: ( for those who want to know a little more)
  97.  
  98. The way I was able to accomplish the size increase was to have the program scan the data more closely. Let me explain. Normally, p2a converts based on a block grid. It stores a certain amount of binary picture data in each block. It passes over each block, converting as it goes, based on what's in the block. So if most of the '1's are on the left of the block, it prints out "|" In other words, it passes over the data like this: (These are just two blocks of data, not halves of a whole graphic file.
  99.  
  100. First,
  101.   _________   _________
  102.  |         | |         |
  103.  |  SCAN   | |         |
  104.  |         | |         |
  105.  `_________' `_________'
  106.                     ^ Block of data being converted into ascii fragment
  107. Then,
  108.   _________   _________
  109.  |         | |         |
  110.  |         | |   SCAN  |
  111.  |         | |         |
  112.  `_________' `_________'
  113.                                  ^ Block of data being converted into ascii fragment
  114.  
  115. Etc....it moves on to the next block.
  116. However, I realized one day that you could skip inbetween blocks, too, so that you get almost twice the resolution for the same amount of data. When you enable HexD, it scans like this:
  117.  
  118. First,
  119.   _________   _________
  120.  |         | |         |
  121.  |  SCAN   | |         |
  122.  |         | |         |
  123.  `_________' `_________'
  124.                     ^ Block of data being converted into ascii fragment
  125. Then,
  126.   _________   _________
  127.  |     :   | |   :     |
  128.  |     : SC A N  :     |
  129.  |     :   | |   :     |
  130.  `_________' `_________'
  131.                            ^ Pseudo block of data being converted into ascii fragment
  132. Then,
  133.   _________   _________
  134.  |         | |         |
  135.  |         | |   SCAN  |
  136.  |         | |         |
  137.  `_________' `_________'
  138.                                  ^ Block of data being converted into ascii fragment
  139.  
  140. So it converts the whole thing a half-a-block of data at a time. Not only that, but it works fairly well. It should do you good in a pinch. The only problem I saw was that it was going to be slow. But actually, it's very quick. This is partly due to the fact that p2a outputs the ascii as it figures it out. I haven't noticed any difference in speed between the two methods at all, but there probably is one. It's negligible.
  141.  
  142. -Ben Syverson
  143.